# from pymysql import *
# # # 查询
# # def main():
# #     conn = connect(user='user',
# #         password='leboAa!#$123',
# #         host='49.233.39.160',
# #         database='lebo16',
# #         port=3306,
# #         charset='utf8')
# #     cs = conn.cursor()
# #     sql = "select * from students17;"
# #
# #     count666 = cs.execute(sql)
# #
# #     print('查询到%d数据' % count666)
# #     ret = cs.fetchone()
# #     print(ret)
# #     cs.close()
# #     conn.close()
# # main()
# # #修改
# # def main():
# #     conn = connect(user='user',
# #         password='leboAa!#$123',
# #         host='49.233.39.160',
# #         database='lebo16',
# #         port=3306,
# #         charset='utf8')
# #     cs = conn.cursor()
# #     sql = "update students17 set name = '哈打字' where name = '666';"
# #
# #     cs.execute(sql)
# #
# #     # print('查询到%d数据' % count666)
# #     # ret = cs.fetchone()
# #     # print(ret)
# #     conn.commit()
# #     cs.close()
# #     conn.close()
# #
# # main()
#
# def main():
#     conn = connect(user='user',
#                    password='leboAa!#$123',
#                    host='49.233.39.160',
#                    database='lebo16',
#                    port=3306,
#                    charset='utf8')
#     #元组转换字典
#     cs = conn.cursor(cursor=cursors.DictCursor)
#     name = input('请输入序号:')
#     # sql = "select * from students17 where studentNo='%s';" % name
#     # num = cs.execute(sql)
#     sql = "select * from students17 where studentNo=%s;"
#     num = cs.execute(sql,name)
#     print(num)
#     print(cs.fetchall())
#     cs.close()
#     conn.close()
#
# main()
import pymysql


def main():
    conn = connect(user='user',
                   password='leboAa!#$123',
                   host='49.233.39.160',
                   database='lebo16',
                   port=3306,
                   charset='utf8')
    cs = conn.cursor()
